package loginsvc

import (
	"server/pkg/myjwt"
)

func GetJwtToken(userId uint, username string) (string, error) {
	//保存元数据信息
	myClaims := myjwt.MyClaims{
		Id:       userId,
		Username: username,
	}

	//登录有效期60天
	return myjwt.GenToken(myClaims, 60*24*60)
}
